Optimal. Leaf size=180 \[ \frac{\left (4 a d \left (4 c^2+d^2\right )+3 b \left (c^3+4 c d^2\right )\right ) \tan (e+f x)}{6 f}+\frac{\left (8 a c^3+12 a c d^2+12 b c^2 d+3 b d^3\right ) \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac{d \left (20 a c d+6 b c^2+9 b d^2\right ) \tan (e+f x) \sec (e+f x)}{24 f}+\frac{(4 a d+3 b c) \tan (e+f x) (c+d \sec (e+f x))^2}{12 f}+\frac{b \tan (e+f x) (c+d \sec (e+f x))^3}{4 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.356296, antiderivative size = 180, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.207, Rules used = {4002, 3997, 3787, 3770, 3767, 8} \[ \frac{\left (4 a d \left (4 c^2+d^2\right )+3 b \left (c^3+4 c d^2\right )\right ) \tan (e+f x)}{6 f}+\frac{\left (8 a c^3+12 a c d^2+12 b c^2 d+3 b d^3\right ) \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac{d \left (20 a c d+6 b c^2+9 b d^2\right ) \tan (e+f x) \sec (e+f x)}{24 f}+\frac{(4 a d+3 b c) \tan (e+f x) (c+d \sec (e+f x))^2}{12 f}+\frac{b \tan (e+f x) (c+d \sec (e+f x))^3}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4002
Rule 3997
Rule 3787
Rule 3770
Rule 3767
Rule 8
Rubi steps
\begin{align*} \int \sec (e+f x) (a+b \sec (e+f x)) (c+d \sec (e+f x))^3 \, dx &=\frac{b (c+d \sec (e+f x))^3 \tan (e+f x)}{4 f}+\frac{1}{4} \int \sec (e+f x) (c+d \sec (e+f x))^2 (4 a c+3 b d+(3 b c+4 a d) \sec (e+f x)) \, dx\\ &=\frac{(3 b c+4 a d) (c+d \sec (e+f x))^2 \tan (e+f x)}{12 f}+\frac{b (c+d \sec (e+f x))^3 \tan (e+f x)}{4 f}+\frac{1}{12} \int \sec (e+f x) (c+d \sec (e+f x)) \left (12 a c^2+15 b c d+8 a d^2+\left (6 b c^2+20 a c d+9 b d^2\right ) \sec (e+f x)\right ) \, dx\\ &=\frac{d \left (6 b c^2+20 a c d+9 b d^2\right ) \sec (e+f x) \tan (e+f x)}{24 f}+\frac{(3 b c+4 a d) (c+d \sec (e+f x))^2 \tan (e+f x)}{12 f}+\frac{b (c+d \sec (e+f x))^3 \tan (e+f x)}{4 f}+\frac{1}{24} \int \sec (e+f x) \left (3 \left (3 b d \left (4 c^2+d^2\right )+4 a \left (2 c^3+3 c d^2\right )\right )+4 \left (4 a d \left (4 c^2+d^2\right )+3 b \left (c^3+4 c d^2\right )\right ) \sec (e+f x)\right ) \, dx\\ &=\frac{d \left (6 b c^2+20 a c d+9 b d^2\right ) \sec (e+f x) \tan (e+f x)}{24 f}+\frac{(3 b c+4 a d) (c+d \sec (e+f x))^2 \tan (e+f x)}{12 f}+\frac{b (c+d \sec (e+f x))^3 \tan (e+f x)}{4 f}+\frac{1}{8} \left (8 a c^3+12 b c^2 d+12 a c d^2+3 b d^3\right ) \int \sec (e+f x) \, dx+\frac{1}{6} \left (4 a d \left (4 c^2+d^2\right )+3 b \left (c^3+4 c d^2\right )\right ) \int \sec ^2(e+f x) \, dx\\ &=\frac{\left (8 a c^3+12 b c^2 d+12 a c d^2+3 b d^3\right ) \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac{d \left (6 b c^2+20 a c d+9 b d^2\right ) \sec (e+f x) \tan (e+f x)}{24 f}+\frac{(3 b c+4 a d) (c+d \sec (e+f x))^2 \tan (e+f x)}{12 f}+\frac{b (c+d \sec (e+f x))^3 \tan (e+f x)}{4 f}-\frac{\left (4 a d \left (4 c^2+d^2\right )+3 b \left (c^3+4 c d^2\right )\right ) \operatorname{Subst}(\int 1 \, dx,x,-\tan (e+f x))}{6 f}\\ &=\frac{\left (8 a c^3+12 b c^2 d+12 a c d^2+3 b d^3\right ) \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac{\left (4 a d \left (4 c^2+d^2\right )+3 b \left (c^3+4 c d^2\right )\right ) \tan (e+f x)}{6 f}+\frac{d \left (6 b c^2+20 a c d+9 b d^2\right ) \sec (e+f x) \tan (e+f x)}{24 f}+\frac{(3 b c+4 a d) (c+d \sec (e+f x))^2 \tan (e+f x)}{12 f}+\frac{b (c+d \sec (e+f x))^3 \tan (e+f x)}{4 f}\\ \end{align*}
Mathematica [A] time = 1.08466, size = 143, normalized size = 0.79 \[ \frac{3 \left (4 a \left (2 c^3+3 c d^2\right )+3 b d \left (4 c^2+d^2\right )\right ) \tanh ^{-1}(\sin (e+f x))+\tan (e+f x) \left (8 \left (d^2 (a d+3 b c) \tan ^2(e+f x)+3 a d \left (3 c^2+d^2\right )+3 b \left (c^3+3 c d^2\right )\right )+9 d \left (4 a c d+b \left (4 c^2+d^2\right )\right ) \sec (e+f x)+6 b d^3 \sec ^3(e+f x)\right )}{24 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.04, size = 290, normalized size = 1.6 \begin{align*}{\frac{a{c}^{3}\ln \left ( \sec \left ( fx+e \right ) +\tan \left ( fx+e \right ) \right ) }{f}}+3\,{\frac{{c}^{2}da\tan \left ( fx+e \right ) }{f}}+{\frac{3\,ac{d}^{2}\sec \left ( fx+e \right ) \tan \left ( fx+e \right ) }{2\,f}}+{\frac{3\,ac{d}^{2}\ln \left ( \sec \left ( fx+e \right ) +\tan \left ( fx+e \right ) \right ) }{2\,f}}+{\frac{2\,{d}^{3}a\tan \left ( fx+e \right ) }{3\,f}}+{\frac{{d}^{3}a\tan \left ( fx+e \right ) \left ( \sec \left ( fx+e \right ) \right ) ^{2}}{3\,f}}+{\frac{{c}^{3}b\tan \left ( fx+e \right ) }{f}}+{\frac{3\,b{c}^{2}d\sec \left ( fx+e \right ) \tan \left ( fx+e \right ) }{2\,f}}+{\frac{3\,b{c}^{2}d\ln \left ( \sec \left ( fx+e \right ) +\tan \left ( fx+e \right ) \right ) }{2\,f}}+2\,{\frac{{d}^{2}cb\tan \left ( fx+e \right ) }{f}}+{\frac{{d}^{2}cb\tan \left ( fx+e \right ) \left ( \sec \left ( fx+e \right ) \right ) ^{2}}{f}}+{\frac{b{d}^{3}\tan \left ( fx+e \right ) \left ( \sec \left ( fx+e \right ) \right ) ^{3}}{4\,f}}+{\frac{3\,b{d}^{3}\sec \left ( fx+e \right ) \tan \left ( fx+e \right ) }{8\,f}}+{\frac{3\,b{d}^{3}\ln \left ( \sec \left ( fx+e \right ) +\tan \left ( fx+e \right ) \right ) }{8\,f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.16779, size = 359, normalized size = 1.99 \begin{align*} \frac{48 \,{\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} b c d^{2} + 16 \,{\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} a d^{3} - 3 \, b d^{3}{\left (\frac{2 \,{\left (3 \, \sin \left (f x + e\right )^{3} - 5 \, \sin \left (f x + e\right )\right )}}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 36 \, b c^{2} d{\left (\frac{2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 36 \, a c d^{2}{\left (\frac{2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} + 48 \, a c^{3} \log \left (\sec \left (f x + e\right ) + \tan \left (f x + e\right )\right ) + 48 \, b c^{3} \tan \left (f x + e\right ) + 144 \, a c^{2} d \tan \left (f x + e\right )}{48 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.578471, size = 510, normalized size = 2.83 \begin{align*} \frac{3 \,{\left (8 \, a c^{3} + 12 \, b c^{2} d + 12 \, a c d^{2} + 3 \, b d^{3}\right )} \cos \left (f x + e\right )^{4} \log \left (\sin \left (f x + e\right ) + 1\right ) - 3 \,{\left (8 \, a c^{3} + 12 \, b c^{2} d + 12 \, a c d^{2} + 3 \, b d^{3}\right )} \cos \left (f x + e\right )^{4} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \,{\left (6 \, b d^{3} + 8 \,{\left (3 \, b c^{3} + 9 \, a c^{2} d + 6 \, b c d^{2} + 2 \, a d^{3}\right )} \cos \left (f x + e\right )^{3} + 9 \,{\left (4 \, b c^{2} d + 4 \, a c d^{2} + b d^{3}\right )} \cos \left (f x + e\right )^{2} + 8 \,{\left (3 \, b c d^{2} + a d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{48 \, f \cos \left (f x + e\right )^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec{\left (e + f x \right )}\right ) \left (c + d \sec{\left (e + f x \right )}\right )^{3} \sec{\left (e + f x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.25672, size = 833, normalized size = 4.63 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]